package com.foreknow.demo14;

public class StringDemo {
    public static void main(String[] args) {
        String name = "fender";
        String new_name = name.concat(" gibson");
        System.out.println(new_name);
        System.out.println("abc".concat("def").concat("xxx"));
        System.out.println(name.length());
        System.out.println("hamburger".substring(4, 8));
        //"hamburger".substring(4, 8) returns "urge"
        System.out.println("hamburger".substring(4));
        System.out.println(name.toUpperCase());
        System.out.println("     abcdef     ".trim());
        String str = "aa bb cc";
        String[] ss = str.split(" ");
        for (int i = 0;i<ss.length;i++) {
            System.out.println(ss[i]);
        }

    }
}
